<script type="text/javascript">
    function secBoard3(n,url)
{
    var leg=document.getElementById('naa-table').getElementsByTagName('li').length;
    for(i=0;i<leg;i++)
    
    var mainleg=document.getElementById('tabb-content').getElementsByTagName('div').length;
    for(i=0;i<mainleg;i++)
    document.getElementById('tabb-content').getElementsByTagName('div')[i].style.display="none";
    document.getElementById('tabb-content').getElementsByTagName('div')[n].style.display="block";
    return false;

}
</script>
<?php 
        $courseid = $_GET['courseid'];
        if($courseid !='')
        {
            $sql_add  = " update nettteach_course set times=times+1 where id = ".$courseid;
            $db ->query($sql_add);
        }
        
        $sql_course = "select * from nettteach_course where id = ".$courseid;
        $result_course = $db ->query($sql_course);
        while($row_course = $db ->fetch_array($result_course))
        {
?>
<div id="sidebar_left">
			<dl>
				<dt>
					<a href="#"><?php echo(fs_get_objinfo('nettteach_course', 'id', $courseid,'title'))?>__<?php echo fs_get_course_fenlei($row_course['sort'])?></a>
				</dt>
				<dd  style="height:450px">
					<ul id="naa_table">
                        <li  class="active" onclick='return secBoard3(0)'>
                            <a  class="article_golink" href="#" style="color:blue">课程介绍</a> 
                        </li>
                        <li onclick='return secBoard3(1)'>
                            <a class="article_golink" href="#" style="color:blue">教学大纲</a> 
                        </li>
                        <li onclick='return secBoard3(2)'>
                            <a  class="article_golink" href="#" style="color:blue">教学日历</a> 
                        </li>
                        <li onclick='return secBoard3(3)'>
                            <a class="article_golink" href="#" style="color:blue">教学信息</a> 
                        </li>
                        <li onclick='return secBoard3(4)'>
                            <a class="article_golink" href="#" style="color:blue">教学视频</a> 
                        </li>
                        <li>
                            <a class="article_golink" href="?do=doexercise" style="color:blue">课后练习</a> 
                        </li>
					</ul>
				</dd>
			</dl>
</div>
<div id="indexcates"  style="margin-left:10px;">
    <div class="top_nav">
        <h2>首页>><a href="">试题库</a>>></h2>
    </div>
        <div class="span9"><!--老师排行榜开始-->
        <div class="row-fluid" style="margin-top:10px;">
            <ul class="breadcrumb">
                <li>
                        <?php
                $teacher_id = $_GET['tid'];
                $sql = "select * from ".DBPREFIX."member  where id =".$teacher_id;
                $result = $db -> query($sql);
                while($row=$db->fetch_array($result)){
                    echo $row['realname'].'老师的题库';
                }
        ?></li>
            </ul>
        </div>			
        <div class="exam_list">
                <table border="0" cellspacing="0" cellpadding="0" width="100%">
                    <thead>
                        <tr><th align="left">试题名称</th><th>考试人数</th><th>操作</th></tr>
                    </thead>
                    <tbody>
                    <?php
                        $exam_sql = "select * from ".DBPREFIX."exam  where exam_pubuid =".$teacher_id." and type=0 and is_exercise=1";
                        $exam_result = $db -> query($exam_sql);
                        while($exam_row=$db->fetch_array($exam_result)){
                    ?>
                        <tr valign="middle">
                            <td width="40%" ><a href="?do=examinfo&id="<?php echo $exam_row['exam_id']?>><?php echo $exam_row['exam_name']?></a></td>
                            
                            <td width="10%" align="center"><?php echo $exam_row['exam_num']?></td>
                            <td width="15%" align="center" ><input type="button" onclick="gotest(<?php echo $exam_row['exam_id'];?> )" class="kaoshi" value="进入考试" /></td>
                        </tr>
                    <?php
                    }?>
                    </tbody>
                </table>
        </div>
        
        
    </div>
</div>
<script type="text/javascript">
    function gotest(examid){
        window.location.href = '?do=exerciseinfo&id='+examid;
    }
</script>
<?php
    }?>